{% extends 'base.html' %}
{% load static %}

{% block content %}
    <div class="list-of-authors">
        {% for author in authors %}
            <div class="information-about-author">
                <div class="photo-of-author">
                    <img src="
                        {% if author.image %}
                            {{ author.image.url }}
                        {% else %}
                            {% static 'images/empty_avatar.jpg' %}
                        {% endif %}
                    " alt="">
                </div>
                <div class="other-information-of-author">
                    <div class="authors-name">
                        <a href="{% url 'author:author' name_slug=author.slug %}" class="link-to-author-big">{{ author.name }}</a>
                    </div>
                    <div class="description-author">
                        {% if author.description %}
                            <p>{{ author.description|truncatewords:40 }}</p>
                        {% else %}
                            <p>Описание автора отсуствует</p>
                        {% endif %}
                    </div>
                </div>
            </div>
        {% endfor %}
    </div>
{% endblock content %}